package com.yj.consumer.dynamicDataSource;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Around;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class UserService {

    @Autowired
    UserMapper userMapper;

    @DataSourceChoose(DataSourceType.LOCAL_DB)
    public List<User> findAll(){
        List<User> list = userMapper.findAll();
        return list;
    }

}
